# demo02_tuple.py
tuple01 = (1, 2, "tom", "jack")
print(len(tuple01))  # 4
print(tuple01[1], tuple01[-2])
print(tuple01[:2])
# tuple01[0] = 10  # 元组不能修改数据
print(tuple01 + (10, 20))  # yes
# tuple01.append("zhangsan")  # no
# 元组中只包含一个元素时，需要在元素后面添加逗号
print(type(   ("hello")   ))
print(type(   ("hello",)  ))
